#!/bin/sh
if [ $# -lt 4 ]
	then
		echo usage: `basename $0` '<server> <indir> <outdir> <subdirs...>'
	echo
	exit 1
fi
server="$1"
indir="$2"
outdir="$3"
shift ; shift ; shift

for dir in $*
do
	echo "Writing RSS for $dir directory..."
	`dirname $0`/wickddrss.py -r \
			-i "$indir/$dir" \
			-o "$outdir/$dir.rss" \
			-u http://$server/rss/$dir.rss \
			-T "Digital Dailies, $dir feed" \
			-D "Current assets uploaded to $server/$indir/$dir"
done
